package com.kly.constants;

import com.kly.domain.dto.user.UserDto;

/**
 * @author admin
 * @date 2025/3/16
 */
@Deprecated
public class UserContext {
    private static final ThreadLocal<UserDto> USER_THREAD_LOCAL = new ThreadLocal<>();

    public static void setUser(UserDto user) {
        USER_THREAD_LOCAL.set(user);
    }

    public static UserDto getUser() {
        return USER_THREAD_LOCAL.get();
    }

    public static void removeUser() {
        USER_THREAD_LOCAL.remove();
    }
}
